//
// Created by RM UI Designer
//

#include "ui_default_trackMode_0.h"

#define FRAME_ID 0
#define GROUP_ID 5
#define START_ID 0
#define OBJ_NUM 2
#define FRAME_OBJ_NUM 2

CAT(ui_, CAT(FRAME_OBJ_NUM, _frame_t)) ui_default_trackMode_0;
ui_interface_rect_t *ui_default_trackMode_tracking = (ui_interface_rect_t *)&(ui_default_trackMode_0.data[0]);
ui_interface_rect_t *ui_default_trackMode_notrack = (ui_interface_rect_t *)&(ui_default_trackMode_0.data[1]);

void _ui_init_default_trackMode_0() {
    for (int i = 0; i < OBJ_NUM; i++) {
        ui_default_trackMode_0.data[i].figure_name[0] = FRAME_ID;
        ui_default_trackMode_0.data[i].figure_name[1] = GROUP_ID;
        ui_default_trackMode_0.data[i].figure_name[2] = i + START_ID;
        ui_default_trackMode_0.data[i].operate_tpyel = 1;
    }

        ui_default_trackMode_0.data[1].operate_tpyel = 0;


    ui_default_trackMode_tracking->figure_tpye = 1;
    ui_default_trackMode_tracking->layer = 1;
    ui_default_trackMode_tracking->start_x = 670;
    ui_default_trackMode_tracking->start_y = 330;
    ui_default_trackMode_tracking->color = 3;
    ui_default_trackMode_tracking->width = 5;
    ui_default_trackMode_tracking->end_x = 1270;
    ui_default_trackMode_tracking->end_y = 730;

    ui_default_trackMode_notrack->figure_tpye = 0;
    ui_default_trackMode_notrack->layer = 0;
    ui_default_trackMode_notrack->start_x = 0;
    ui_default_trackMode_notrack->start_y = 0;
    ui_default_trackMode_notrack->color = 0;
    ui_default_trackMode_notrack->width = 0;
    ui_default_trackMode_notrack->end_x = 0;
    ui_default_trackMode_notrack->end_y = 0;


    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}

void _ui_update_default_trackMode_0() {

        ui_default_trackMode_0.data[0].operate_tpyel = 2;
        ui_default_trackMode_0.data[1].operate_tpyel = 0;


    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}

void _ui_remove_default_trackMode_0() {

    ui_default_trackMode_0.data[1].operate_tpyel = 0;
        ui_default_trackMode_0.data[0].operate_tpyel = 3;
    

    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}

void _ui_init_default_trackMode_1() {
    for (int i = 0; i < OBJ_NUM; i++) {
        ui_default_trackMode_0.data[i].figure_name[0] = FRAME_ID;
        ui_default_trackMode_0.data[i].figure_name[1] = GROUP_ID;
        ui_default_trackMode_0.data[i].figure_name[2] = i + START_ID;
        ui_default_trackMode_0.data[i].operate_tpyel = 1;
    }

    ui_default_trackMode_0.data[0].operate_tpyel = 0;


    ui_default_trackMode_notrack->figure_tpye = 1;
    ui_default_trackMode_notrack->layer = 1;
    ui_default_trackMode_notrack->start_x = 670;
    ui_default_trackMode_notrack->start_y = 330;
    ui_default_trackMode_notrack->color = 6;
    ui_default_trackMode_notrack->width = 1;
    ui_default_trackMode_notrack->end_x = 1270;
    ui_default_trackMode_notrack->end_y = 730;


    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}

void _ui_update_default_trackMode_1() {
    ui_default_trackMode_0.data[0].operate_tpyel = 0;
        ui_default_trackMode_0.data[1].operate_tpyel = 2;

    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}

void _ui_remove_default_trackMode_1() {

    ui_default_trackMode_0.data[1].operate_tpyel = 3;
    ui_default_trackMode_0.data[0].operate_tpyel = 0;


    CAT(ui_proc_, CAT(FRAME_OBJ_NUM, _frame))(&ui_default_trackMode_0);
    SEND_MESSAGE((uint8_t *) &ui_default_trackMode_0, sizeof(ui_default_trackMode_0));
}
